package packageofjbxq;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import bingliandshuju.SingleDataofAll;
import bingliandshuju.SingleInformationofIllnessDetail;

import com.example.animaldoctor03.*;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class BingYuan extends Activity {

	private Button buttonofbyf = null;
	private TextView textofby = null;
	private String bingyuan = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.bingyuan1);
		
		buttonofbyf = (Button)findViewById(R.id.buttonofbyf);
		textofby = (TextView)findViewById(R.id.textofby);
		
		buttonofbyf.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				List<Object> listofbyf = new ArrayList <Object>();
				SingleDataofAll SDAofbyf = SingleDataofAll.getInstance();
				listofbyf = SDAofbyf.getListinformation();
				
				Bundle bundleofbyf = new Bundle();
				bundleofbyf.putSerializable("shuju", (Serializable) listofbyf);
				Intent intentofbyf = new Intent(BingYuan.this , AllIllness.class);
				intentofbyf.putExtras(bundleofbyf);
				startActivity(intentofbyf);
				finish();
				
			}
		});
		

		
		SingleInformationofIllnessDetail SIIDofby = SingleInformationofIllnessDetail.getInstance();
		bingyuan =	SIIDofby.getbingyuan();
		Message msgofby = new Message();
		msgofby.what = 1;
		handlerofby.sendMessage(msgofby);
		
		
	}
	public Handler handlerofby = new Handler(){


		public void handleMessage(Message msg) {
			// TODO Auto-generated method stub
		
			if(msg.what == 1){
				
				textofby.setText("    病原            " + '\n' + '\n' + bingyuan);
			}
		}
		
		
	};

}
